$(function() {
	//复制列表
	var $item = $(".post_list .post_item");
	$(".post_list").append($item.clone()).append($item.clone()).append($item.clone());

	$("#t1").datetimepicker();

	/*获得新浪天气*/
	var url = "http://sapi.sina.cn/ls/allasync?ver=3";
	$.ajax({
		url: url,
		type: "get",
		timeout: 60000,
		dataType: "jsonp",
		success: function(record, type) {
			var d = eval(record);
			var img = d.retData.weather.icon_v3; //图标 icon icon_v3
			var city = d.retData.weather.city;
			var up = d.retData.weather.up;
			var down = d.retData.weather.down;

			var e = $("#tweather");
			if(img) {
				e.empty();
				e.append("<div id='wicon' class='pull-right' style='margin-right:5px'><img src='" + img + "' width=20 height=20 />&nbsp;" + city + "&nbsp; " + down + "&nbsp;~&nbsp;" + up + "℃</div>");
			}

		},
		error: function(XMLHttpRequest, textStatus, errorThrown) {}
	});
	
	$("#for-nav-search").on("click", function(){
		$("#nav-search").toggle(400);
		return false;
	});

});